YES 1.415
H-Termination proof of /home/matraf/haskell/eval_FullyBlown_Fast/List.hs
H-Termination of the given Haskell-Program with start terms could successfully be proven:
↳ HASKELL
↳ CR
mainModule List
| ((insert :: Int -> [Int] -> [Int]) :: Int -> [Int] -> [Int]) |
module List where
| import qualified Maybe import qualified Prelude
|
| insert :: Ord a => a -> [a] -> [a]
insert | e ls | = | insertBy compare e ls |
|
| insertBy :: (a -> a -> Ordering) -> a -> [a] -> [a]
insertBy | _ x [] | = | x : [] |
insertBy | cmp x ys@(y : ys') | = |
case | cmp x y of |
| GT | -> | y : insertBy cmp x ys' |
| _ | -> | x : ys |
|
|
module Maybe where
| import qualified List import qualified Prelude
|
Case Reductions:
The following Case expression
case | cmp x y of |
| GT | → y : insertBy cmp x ys' |
| _ | → x : ys |
is transformed to
insertBy0 | y cmp x ys' ys GT | = y : insertBy cmp x ys' |
insertBy0 | y cmp x ys' ys _ | = x : ys |
↳ HASKELL
↳ CR
↳ HASKELL
↳ BR
mainModule List
| ((insert :: Int -> [Int] -> [Int]) :: Int -> [Int] -> [Int]) |
module List where
| import qualified Maybe import qualified Prelude
|
| insert :: Ord a => a -> [a] -> [a]
insert | e ls | = | insertBy compare e ls |
|
| insertBy :: (a -> a -> Ordering) -> a -> [a] -> [a]
insertBy | _ x [] | = | x : [] |
insertBy | cmp x ys@(y : ys') | = | insertBy0 y cmp x ys' ys (cmp x y) |
|
|
insertBy0 | y cmp x ys' ys GT | = | y : insertBy cmp x ys' |
insertBy0 | y cmp x ys' ys _ | = | x : ys |
|
module Maybe where
| import qualified List import qualified Prelude
|
Replaced joker patterns by fresh variables and removed binding patterns.
Binding Reductions:
The bind variable of the following binding Pattern
ys@(vy : vz)
is replaced by the following term
vy : vz
↳ HASKELL
↳ CR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
mainModule List
| ((insert :: Int -> [Int] -> [Int]) :: Int -> [Int] -> [Int]) |
module List where
| import qualified Maybe import qualified Prelude
|
| insert :: Ord a => a -> [a] -> [a]
insert | e ls | = | insertBy compare e ls |
|
| insertBy :: (a -> a -> Ordering) -> a -> [a] -> [a]
insertBy | vx x [] | = | x : [] |
insertBy | cmp x (vy : vz) | = | insertBy0 vy cmp x vz (vy : vz) (cmp x vy) |
|
|
insertBy0 | y cmp x ys' ys GT | = | y : insertBy cmp x ys' |
insertBy0 | y cmp x ys' ys vw | = | x : ys |
|
module Maybe where
| import qualified List import qualified Prelude
|
Cond Reductions:
The following Function with conditions
is transformed to
undefined0 | True | = undefined |
undefined1 | | = undefined0 False |
↳ HASKELL
↳ CR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
mainModule List
| (insert :: Int -> [Int] -> [Int]) |
module List where
| import qualified Maybe import qualified Prelude
|
| insert :: Ord a => a -> [a] -> [a]
insert | e ls | = | insertBy compare e ls |
|
| insertBy :: (a -> a -> Ordering) -> a -> [a] -> [a]
insertBy | vx x [] | = | x : [] |
insertBy | cmp x (vy : vz) | = | insertBy0 vy cmp x vz (vy : vz) (cmp x vy) |
|
|
insertBy0 | y cmp x ys' ys GT | = | y : insertBy cmp x ys' |
insertBy0 | y cmp x ys' ys vw | = | x : ys |
|
module Maybe where
| import qualified List import qualified Prelude
|
Haskell To QDPs
↳ HASKELL
↳ CR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
new_insertBy(ww300, :(ww410, ww411)) → new_insertBy00(ww410, Pos(Succ(ww300)), ww411)
new_insertBy0(ww59, ww60, ww61, Succ(ww620), Zero) → new_insertBy(ww60, ww61)
new_insertBy00(Neg(Succ(ww4000)), Neg(Zero), :(ww410, ww411)) → new_insertBy00(ww410, Neg(Zero), ww411)
new_insertBy00(Neg(Succ(ww4000)), Pos(Zero), :(ww410, ww411)) → new_insertBy00(ww410, Pos(Zero), ww411)
new_insertBy00(Pos(Succ(ww4000)), Pos(Succ(ww300)), ww41) → new_insertBy0(ww4000, ww300, ww41, ww300, ww4000)
new_insertBy00(Neg(ww400), Pos(Succ(ww300)), :(ww410, ww411)) → new_insertBy00(ww410, Pos(Succ(ww300)), ww411)
new_insertBy01(ww65, ww66, :(ww670, ww671), Succ(ww680), Zero) → new_insertBy00(ww670, Neg(Succ(ww66)), ww671)
new_insertBy00(Pos(Zero), Pos(Succ(ww300)), ww41) → new_insertBy(ww300, ww41)
new_insertBy00(Neg(Succ(ww4000)), Neg(Succ(ww300)), ww41) → new_insertBy01(ww4000, ww300, ww41, ww4000, ww300)
new_insertBy0(ww59, ww60, ww61, Succ(ww620), Succ(ww630)) → new_insertBy0(ww59, ww60, ww61, ww620, ww630)
new_insertBy01(ww65, ww66, ww67, Succ(ww680), Succ(ww690)) → new_insertBy01(ww65, ww66, ww67, ww680, ww690)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 4 SCCs.
↳ HASKELL
↳ CR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_insertBy01(ww65, ww66, :(ww670, ww671), Succ(ww680), Zero) → new_insertBy00(ww670, Neg(Succ(ww66)), ww671)
new_insertBy00(Neg(Succ(ww4000)), Neg(Succ(ww300)), ww41) → new_insertBy01(ww4000, ww300, ww41, ww4000, ww300)
new_insertBy01(ww65, ww66, ww67, Succ(ww680), Succ(ww690)) → new_insertBy01(ww65, ww66, ww67, ww680, ww690)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_insertBy01(ww65, ww66, :(ww670, ww671), Succ(ww680), Zero) → new_insertBy00(ww670, Neg(Succ(ww66)), ww671)
The graph contains the following edges 3 > 1, 3 > 3
- new_insertBy01(ww65, ww66, ww67, Succ(ww680), Succ(ww690)) → new_insertBy01(ww65, ww66, ww67, ww680, ww690)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3, 4 > 4, 5 > 5
- new_insertBy00(Neg(Succ(ww4000)), Neg(Succ(ww300)), ww41) → new_insertBy01(ww4000, ww300, ww41, ww4000, ww300)
The graph contains the following edges 1 > 1, 2 > 2, 3 >= 3, 1 > 4, 2 > 5
↳ HASKELL
↳ CR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_insertBy00(Neg(Succ(ww4000)), Pos(Zero), :(ww410, ww411)) → new_insertBy00(ww410, Pos(Zero), ww411)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_insertBy00(Neg(Succ(ww4000)), Pos(Zero), :(ww410, ww411)) → new_insertBy00(ww410, Pos(Zero), ww411)
The graph contains the following edges 3 > 1, 2 >= 2, 3 > 3
↳ HASKELL
↳ CR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
new_insertBy00(Neg(Succ(ww4000)), Neg(Zero), :(ww410, ww411)) → new_insertBy00(ww410, Neg(Zero), ww411)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_insertBy00(Neg(Succ(ww4000)), Neg(Zero), :(ww410, ww411)) → new_insertBy00(ww410, Neg(Zero), ww411)
The graph contains the following edges 3 > 1, 2 >= 2, 3 > 3
↳ HASKELL
↳ CR
↳ HASKELL
↳ BR
↳ HASKELL
↳ COR
↳ HASKELL
↳ Narrow
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ QDPSizeChangeProof
Q DP problem:
The TRS P consists of the following rules:
new_insertBy(ww300, :(ww410, ww411)) → new_insertBy00(ww410, Pos(Succ(ww300)), ww411)
new_insertBy0(ww59, ww60, ww61, Succ(ww620), Zero) → new_insertBy(ww60, ww61)
new_insertBy00(Pos(Succ(ww4000)), Pos(Succ(ww300)), ww41) → new_insertBy0(ww4000, ww300, ww41, ww300, ww4000)
new_insertBy00(Neg(ww400), Pos(Succ(ww300)), :(ww410, ww411)) → new_insertBy00(ww410, Pos(Succ(ww300)), ww411)
new_insertBy00(Pos(Zero), Pos(Succ(ww300)), ww41) → new_insertBy(ww300, ww41)
new_insertBy0(ww59, ww60, ww61, Succ(ww620), Succ(ww630)) → new_insertBy0(ww59, ww60, ww61, ww620, ww630)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- new_insertBy00(Neg(ww400), Pos(Succ(ww300)), :(ww410, ww411)) → new_insertBy00(ww410, Pos(Succ(ww300)), ww411)
The graph contains the following edges 3 > 1, 2 >= 2, 3 > 3
- new_insertBy(ww300, :(ww410, ww411)) → new_insertBy00(ww410, Pos(Succ(ww300)), ww411)
The graph contains the following edges 2 > 1, 2 > 3
- new_insertBy00(Pos(Succ(ww4000)), Pos(Succ(ww300)), ww41) → new_insertBy0(ww4000, ww300, ww41, ww300, ww4000)
The graph contains the following edges 1 > 1, 2 > 2, 3 >= 3, 2 > 4, 1 > 5
- new_insertBy00(Pos(Zero), Pos(Succ(ww300)), ww41) → new_insertBy(ww300, ww41)
The graph contains the following edges 2 > 1, 3 >= 2
- new_insertBy0(ww59, ww60, ww61, Succ(ww620), Succ(ww630)) → new_insertBy0(ww59, ww60, ww61, ww620, ww630)
The graph contains the following edges 1 >= 1, 2 >= 2, 3 >= 3, 4 > 4, 5 > 5
- new_insertBy0(ww59, ww60, ww61, Succ(ww620), Zero) → new_insertBy(ww60, ww61)
The graph contains the following edges 2 >= 1, 3 >= 2